<?php

namespace App\Entities;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

class Deportment extends Model implements Transformable
{
    use TransformableTrait;

    protected $fillable = ['name'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function patientType(){
        return $this->hasMany('App\Entities\PatientType', 'deportment_id', 'id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function doctor(){
        return $this->hasMany('App\Entities\Doctor', 'deportment_id', 'id');
    }

}
